/*
 *    This file is part of BlobDB.
 *
 *    BlobDB is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation, either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    BlobDB is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with BlobDB.  If not, see <http://www.gnu.org/licenses/>.
 *    
 *    Copyright(c) 2011 Michael Kankkonen
 *    http://www.vnetcon.org
 */


package org.vnetcon.blobdb.database.backend.gae.jdo;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Blob;
import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class Table {
	
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key tableKey;

	@Persistent
	private int tableID;
    
	@Persistent
	private String schema;
	
	@Persistent
	private String tableName;

	@Persistent
	private Blob columnInfo;
	
	@Persistent
	private int rowsize;

	@Persistent
	private int maxrows;

	
	public Table(int tableID, String schema, String tableName, int rowsize, int maxrows){
		this.schema = schema;
		this.tableName = tableName;
		this.rowsize = rowsize;
		this.maxrows = maxrows;
		this.tableID = tableID;
	}

	public void setTableKey(Key tableKey){
		this.tableKey = tableKey;
	}

	public String getSchema() {
		return schema;
	}


	public void setSchema(String schema) {
		this.schema = schema;
	}


	public String getTableName() {
		return tableName;
	}


	public void setTableName(String tableName) {
		this.tableName = tableName;
	}


	public Blob getColumnInfo() {
		return columnInfo;
	}


	public void setColumnInfo(Blob columnInfo) {
		this.columnInfo = columnInfo;
	}


	public Key getTableKey() {
		return tableKey;
	}

	public int getRowsize() {
		return rowsize;
	}

	public int getMaxrows() {
		return maxrows;
	}

	public void setMaxrows(int maxrows) {
		this.maxrows = maxrows;
	}

	public int getTableID() {
		return tableID;
	}


	
}
